﻿using System;

using Gurucore.Framework.DataAccess;

namespace $class.Namespace$
{
	$if(class.IsTable)$
		$if (class.NoConventionPK)$
	[MappedTable(PrimaryKey = class.primaryKey)]
		$else$
	[MappedTable]
		$endif$
	$else$
	[MappedTable(Upclassble = false)]
	$endif$
	public class $class.TableName$DTO : DTOBase
	{
		$properties:{
		public const string $it.ConstantName$ = "$it.ColumnName$";
		}$		
		$properties:{
		private $it.PropertyType$ $it.VariableName$;

		$if(it.IsIdentity)$
		[MappedColumn(Identity = true)]
		$else$
		[MappedColumn]
		$endif$
		public $it.PropertyType$ $it.PropertyName$
		{
			get { return $it.VariableName$; }
			set 
			{ 
				this.SetNotNull($class.TableName$DTO.$it.ConstantName$);
				$it.VariableName$ = value; 
			}
		}
		
		}$
	}
}
